<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
    <div data-th-replace="layout/head-top"></div>
    <div class="m-t-lg">
        <dl class="dl-horizontal">
            <dt>课程ID：</dt>
            <dd class="m-r"><span class="fs12 c-4e" th:text="${course['id']}"></span></dd>
        </dl>
        <div class="hr-line-dashed"></div>
        <dl class="dl-horizontal">
            <dt>课程名称：</dt>
            <dd class="m-r"><span class="fs12 c-4e" th:text="${course['courseName']}"></span></dd>
        </dl>
        <div class="hr-line-dashed"></div>

        <dl class="dl-horizontal">
            <dt>课程售价/课程原价(元)：</dt>
            <dd class="m-r"><span class="fs12 c-4e" th:text="${course['realPrice']}+'/'+${course['orPrice']}"></span></dd>
        </dl>
        <div class="hr-line-dashed"></div>

        <dl class="dl-horizontal">
            <dt>课程有效期类型：</dt>
            <dd class="m-r">
                <span class="fs12 c-4e" th:text="${course['validType']}==1 ? '指定天数内':'指定日期前'"></span>
            </dd>
        </dl>
        <div class="hr-line-dashed"></div>

        <dl class="dl-horizontal">
            <dt>课程有效期：</dt>
            <dd class="m-r">
                <span class="fs12 c-4e" th:text="${course['validType']}==1 ? ${course['validDay']}+'天': ${course['validTime']}+'前'">
                </span>
            </dd>
        </dl>
        <div class="hr-line-dashed"></div>

        <dl class="dl-horizontal">
            <dt>课程创建时间：</dt>
            <dd class="m-r">
                <span class="fs12 c-4e" th:text="${#strings.substring(course['createTime'],0,16)}">
                </span>
            </dd>
        </dl>
        <div class="hr-line-dashed"></div>

        <dl class="dl-horizontal">
            <dt>初始化购买人数：</dt>
            <dd class="m-r">
                <span class="fs12 c-4e" th:text="${course['initBuyNum']} + ${course['courseProfile']['buyCount']}"></span>
            </dd>
        </dl>
        <div class="hr-line-dashed"></div>

        <dl class="dl-horizontal">
            <dt>分销商代卖：</dt>
            <dd class="m-r">
                <span class="fs12 c-4e" th:text="${course['allow']}==1 ? '不允许' : '允许'"></span>
            </dd>
        </dl>
        <div class="hr-line-dashed"></div>
        <th:block th:if="${course['courseTypeKey']}== 'PACKAGE'">
            <dl class="dl-horizontal" th:if="${course['courseTypeKey']}== 'PACKAGE'">
                <dt>套餐内课程：</dt>
                <dd class="m-r">
                  <span class="fs12 c-4e" th:if="${#lists.isEmpty(packList)}">未包含任何课程</span>
                    <ul class="tag-list clearfix">
                        <li class="ml10 mb10" th:if="!${#lists.isEmpty(packList)}" th:each="pack:${packList}">
                          <span th:if="${pack['course']}!=null"><i class="fa fa-circle text-danger"></i>
                                <span th:text="${pack['course']['courseName']}+'(id:'+${pack['courseId']}+')'"></span>
                            </span>
                        </li>
                    </ul>
                </dd>
            </dl>
            <div class="hr-line-dashed"></div>
        </th:block>
        <th:block th:if="${course['courseTypeKey']}== 'LIVE'">
            <dl class="dl-horizontal">
                <dt>直播素材：</dt>
                <dd class="m-r">
                    <span class="fs12 c-4e" th:if="${#lists.isEmpty(liveMap)}">未包含直播素材</span>
                    <ul class="tag-list clearfix">
                        <th:block th:if="!${#lists.isEmpty(liveMap)}" th:each="liveMaterial:${liveMap}">
                            <li class="ml10 mb10 openMaterial" th:if="${liveMaterial['materialId']}!= 0 and  ${liveMaterial['materialTypeKey']} eq 'LIVE'  and  ${liveMaterial['material']} !=null ">
                            <span th:attr="data-id=${liveMaterial['material']['id']}"><i class="fa fa-circle text-danger"></i>
                                <span th:text="${liveMaterial['material']['name']}+'(id:'+${liveMaterial['material']['id']}+')'"></span>
                            </span>
                            </li>
                        </th:block>
                    </ul>
                </dd>
            </dl>
            <div class="hr-line-dashed"></div>
        </th:block>
        <dl class="dl-horizontal">
            <dt>课程类型：</dt>
            <dd class="m-r">
            <span class="fs12 c-4e">
                <span th:if="${course['courseTypeKey']}== 'COLUMNS'">专栏</span>
                <span th:if="${course['courseTypeKey']}== 'LIVE'">直播</span>
                <span th:if="${course['courseTypeKey']}== 'VIDEO'">视频</span>
                <span th:if="${course['courseTypeKey']}== 'PACKAGE'">套餐</span>
            </span>
            </dd>
        </dl>
        <div class="hr-line-dashed"></div>
        <th:block th:if="${course['courseTypeKey']} !='PACKAGE'">
            <dl class="dl-horizontal">
                <dt>课程专业/科目：</dt>
                <dd class="m-r">
                    <th:block th:if="!${#lists.isEmpty(course['subjectList'])}">
                        <span class="fs12 c-4e" th:each="subject,subIndex : ${course['subjectList']}">
                            <th:block th:text="${subject['subjectName']}+'/'"></th:block>
                            <th:block th:if="!${#lists.isEmpty(subject['childSubjectList'])}" th:each="child,index : ${subject['childSubjectList']}">
                                <th:block th:if="${index.last} == false" th:text="${child['subjectName']}+'/'"></th:block>
                                <th:block th:if="${index.last} == true" th:text="${child['subjectName']}"></th:block>
                            </th:block>
                            <th:block th:if="${#lists.isEmpty(subject['childSubjectList'])}">全部科目</th:block>
                            <th:block th:if="${subIndex.last}==false" th:utext="'<br/>'"></th:block>
                        </span>
                    </th:block>
                    <th:block th:if="${#lists.isEmpty(course['subjectList'])}">
                        <span class="fs12 c-4e">—</span>
                    </th:block>
                </dd>
            </dl>
            <div class="hr-line-dashed"></div>
        </th:block>

        <dl class="dl-horizontal">
            <dt>课程教师：</dt>
            <dd class="m-r">
                <span class="fs12 c-4e" th:if="${#lists.isEmpty(course['teacherList'])}">未关联任何教师</span>
                <ul class="tag-list clearfix">
                    <li class="ml10 mb10" th:if="!${#lists.isEmpty(course['teacherList'])}" th:each="teacher:${course['teacherList']}">
                        <span>
                            <i class="fa fa-circle text-danger"></i>
                            <span th:text="${teacher['teacherName']}"></span>
                        </span>
                    </li>
                </ul>
            </dd>
        </dl>
        <div class="hr-line-dashed"></div>
    </div>
</html>